load(
    "@rules_erlang//tools:erlang.bzl",
    "erlang_toolchain_external",
    "erlang_toolchain_from_github_release",
    "erlang_toolchain_from_http_archive",
)
load(
    "//bazel/elixir:elixir.bzl",
    "elixir_toolchain_external",
    "elixir_toolchain_from_github_release",
)

erlang_toolchain_external()

erlang_toolchain_from_github_release(
    name_suffix = "_23",
    sha256 = "e3ecb3ac2cc549ab90cd9f8921eaebc8613f4d5c89972a3987e5a762d5a2df08",
    version = "23.3.4.16",
)

erlang_toolchain_from_github_release(
    name_suffix = "_24",
    sha256 = "0376d50f867a29426d47600056e8cc49c95b51ef172b6b9030628e35aecd46af",
    version = "24.3.4.2",
)

erlang_toolchain_from_github_release(
    name_suffix = "_25",
    sha256 = "0d7558bc16f3e6b61964521e0157e1a75aad1770bb08af10366ea4c83441ec28",
    version = "25.0.3",
)

erlang_toolchain_from_http_archive(
    erlang_constraint = "//bazel/platforms:erlang_git_master",
    name_suffix = "_git_master",
    strip_prefix = "otp-master",
    url = "https://github.com/erlang/otp/archive/refs/heads/master.tar.gz",
)

elixir_toolchain_external()

elixir_toolchain_from_github_release(
    name_suffix = "_1_10",
    sha256 = "8518c78f43fe36315dbe0d623823c2c1b7a025c114f3f4adbb48e04ef63f1d9f",
    version = "1.10.4",
)

elixir_toolchain_from_github_release(
    name_suffix = "_1_12",
    sha256 = "c5affa97defafa1fd89c81656464d61da8f76ccfec2ea80c8a528decd5cb04ad",
    version = "1.12.3",
)

elixir_toolchain_from_github_release(
    name_suffix = "_1_13",
    sha256 = "95daf2dd3052e6ca7d4d849457eaaba09de52d65ca38d6933c65bc1cdf6b8579",
    version = "1.13.4",
)
